# alass
# 自动扩展别名
globalias() {
   zle _expand_alias
   zle expand-word
   zle self-insert
   # zle -I
}
zle -N globalias
bindkey -M emacs ' ' globalias

alias ..='cd ..'
alias 1='cd -1'
alias 2='cd -2'
alias 3='cd -3'
alias 4='cd -4'
alias 5='cd -5'
alias 6='cd -6'
alias 7='cd -7'
alias 8='cd -8'
alias 9='cd -9'
# 全局别名
# alias -g h='history'
# alias -g repo='/etc/yum.repos.d'
alias -g conf='$XDG_CONFIG_HOME'
alias -g dk='docker'

# lsd
alias l='lsd'
alias l1='lsd -1'
alias ll='lsd -l'
alias la='lsd -a'
alias lla='lsd -la'
alias lt='lsd -lt'
alias lS='lsd -lS'
alias ltree='lsd --tree'

# nvim
alias nv='nvim'
alias -s py=nv
alias -s html=nv
alias -s js=nv
alias -s ts=nv
alias -s vue=nv
alias -s conf=nv
alias sr='source $ZDOTDIR/.zshrc'
alias httpd='http -d'
alias hd='http -d'
alias httpb='http -b'
alias hb='http -b'
# chezmoi
alias cz='~/bin/chezmoi'
# python
alias py='python3'
alias python='python3'
alias pip='pip3'
alias pytree='python3 ~/.config/scripts/tree.py'
alias fy='python3 ~/.config/scripts/ydfy.py'
# alias 'py i'='python3 ~/.config/scripts/install.py'
# other
alias projects='cd ~/Documents/projects'
alias pn='pnpm'
# alias cp='cp --backup=numbered'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias grep='grep -i --color=auto'
alias batp='bat -p'
# alias xh='xh -s monokai'
alias xhd='xh -d'
alias xhb='xh -b'
# alias ossutilc='ossutil -c ~/.config/.ossutilconfig'

# git
alias ga='git add'
alias gaa='git add --all'
# alias gb='git branch'
# alias gba='git branch --all'
# alias gcb='git checkout -b'
alias gl='git pull'
# alias gm='git merge'
alias gp='git push'
# }}}

alias k='kubectl'

# alias systemctl='systemctl'
alias sstatus='systemctl status'
alias srestart='systemctl restart'

# x-cmd
alias xcmd='. "$HOME/.x-cmd.root/X"'

# zellij
alias zlj='zellij'

# acme.sh
alias acme.sh=~/.acme.sh/acme.sh

## dotfile配置文件
alias enavi="${EDITOR:-vim} $XDG_CONFIG_HOME/navi/cheats"
alias ezshrc="${EDITOR:-vim} $ZDOTDIR/.zshrc"
alias ealias="${EDITOR:-vim} $XDG_CONFIG_HOME/zsh/aliases.zsh"
alias 'zstyle_manual'='bat -l sh -p ~/.config/zsh/manual/zstyle.txt'
alias 'zsh_completion'='bat -l sh -p ~/.config/zsh/manual/completion.txt'

# apt 
alias apti='apt install '
alias apts='apt search '
alias aptrm='apt remove '
